<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix='fn' uri="http://java.sun.com/jsp/jstl/functions"%>


<link href="<c:url value='/'/>/css/jquery-ui.css" rel="stylesheet"
	type="text/css" />
<script type="text/javascript" src="<c:url value='/'/>/js/gdl.js"></script>
<script language="javascript" type="text/javascript"
	src="<c:url value='/'/>/js/interface.js"></script>
<script language="javascript" type="text/javascript"
	src="<c:url value='/'/>/js/jquery-ui.js"></script>
<script language="javascript" type="text/javascript"
	src="<c:url value='/'/>/js/dateFormat.js"></script>

<script type="text/javascript">

	jQuery(function($) {
		$("input.data").mask("99/99/9999", {
			placeholder : ""
		});
	});
	jQuery(function($) {
		$("#ano").mask("9999", {
			placeholder : ""
		});
	});

	$(function() {
		$(".column").sortable({
			connectWith : '.column',
			handle : $(".portlet-header")
		});

		$(".portlet").addClass(
				"ui-widget ui-widget-content ui-helper-clearfix ui-corner-all")
				.find(".portlet-header").addClass(
						"ui-widget-header ui-corner-all").prepend(
						'<span class="ui-icon ui-icon-minusthick"></span>')
				.end().find(".portlet-content");

		$(".portlet-header .ui-icon").click(
				function() {
					$(this).toggleClass("ui-icon-minusthick").toggleClass(
							"ui-icon-plusthick");
					$(this).parents(".portlet:first").find(".tabelaDiv")
							.toggle();
				});

		$.datepicker.setDefaults($.datepicker.regional['pt-BR']);
		$("#calendario").datepicker({
			maxDate : '+1m',
			onSelect : exibeAtividades
		});
	});

	function exibeAtividades(data) {

	}

	$.ajaxSetup({
		cache : false
	});
</script>
<div class="imprimir_modal">
	<span onclick="window.print()">Imprimir</span>
</div>
<div class="fechar_modal">
	Fechar
</div>
<center>
	<h1>${usuario.dadosPessoais.nomeCompleto}</h1>
</center>

<div class="form_cadastro">
	<fieldset>
		<legend>
			<b><fmt:message key="cadastro_curriculo_titulo_cartas_recomendacao" /> </b>
		</legend>
			<div class="column" style="width: 100%" >
				<div class="portlet" style="width: 100%; float: none;">
					<div class="portlet-header"> 
						<fmt:message key="cadastro_recomendacao_titulo_cartas_enviadas">
						      <fmt:param value="${fn:length(cartasDeRecomendacao)}"/>					      
						</fmt:message>					  
					</div>
					
					<div class="tabelaDiv">
						<table class="tabela" cellpadding="5px" cellspacing="0">
							<tr> 
								<th> <b><fmt:message key="cadastro_recomendacao_tabela_titulo_nome" /></b> </th>
								<th> <b><fmt:message key="cadastro_recomendacao_tabela_titulo_instituicao" /></b>  </th>
								<th> <b><fmt:message key="cadastro_recomendacao_tabela_titulo_email" /></b>  </th>
								<th> <b><fmt:message key="cadastro_recomendacao_tabela_titulo_data_envio" /></b> </th>
								<th><b><fmt:message key="cadastro_recomendacao_tabela_titulo_carta_respondida"/></b></th>
							</tr>
							
							<c:forEach  var="carta" items="${cartasDeRecomendacao}" varStatus="rowCounter">
								<!-- Uma linha de cada cor -->
								<c:choose>
									<c:when test="${rowCounter.count % 2 == 0}">
										<c:set var="rowStyle" scope="page" value="odd"/>
									</c:when>
									<c:otherwise>
										<c:set var="rowStyle" scope="page" value="even"/>
									</c:otherwise>
						        </c:choose>
							 	<tr class="${rowStyle}"> 
									<td>${carta.nome}</td>
									<td>${carta.instituicao}</td>
									<td>${carta.email}</td>
									<td> <fmt:formatDate value="${carta.dataDeEnvio}" pattern="dd/MM/yyyy - HH:mm"/> </td>
									<c:if test="${carta.tempoConheceCandidato != null }">
									<td><fmt:message key="sim"/></td>									
									</c:if>
									<c:if test="${carta.tempoConheceCandidato == null }">
									<td><fmt:message key="nao"/></td>
									</c:if>									
								</tr>			
							</c:forEach>					
						</table>
					</div>
				</div>
			</div>	
	</fieldset>


	<div class=clear></div>
</div>